package com.project.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.MovieTicketBean;
import com.project.bean.UserBean;
import com.project.service.IMovieTickServer;
import com.project.service.IUserService;
import feign.Feign;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("sell")
public class UserController {
    @Autowired
    private IUserService userService;
  @Autowired
  private IMovieTickServer movieTickServer;


    @RequestMapping("login")
    private UserBean login(String username, String password){
        return  userService.login(username, password);
   }

    @RequestMapping("showTickets")
    IPage<MovieTicketBean> findByItem(Integer pageNO, String movieName, String cinemaName, String movieTime, Integer rowNumber){
        return movieTickServer.findByItem(pageNO, movieName, cinemaName, movieTime, rowNumber);
    }


}
